<%--
    Document   : Home
    Created on : 13/04/2011, 13:41:57
    Author     : Dalhanges
--%>
<%@page import="VendaDeCarros.Veiculos"%>
<%@page import="VendaDeCarros.PMF"%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false"%>
<%@ page import="java.util.List" %>
<%@ page import="javax.jdo.PersistenceManager" %>
<%@ page import="com.google.appengine.api.users.User" %>
<%@ page import="com.google.appengine.api.users.UserService" %>
<%@ page import="com.google.appengine.api.users.UserServiceFactory" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>


<html>
    <head>
        <link type="text/css" rel="stylesheet" href="/CSS/Home.css" />
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <title>Home</title>
    </head>
    <body>
        <f:view>
            <h:form>
            <center><h1>Buscar Veículos</h1></center>
            <pre>
           <label>Marca:</label>
                            <h:selectOneMenu value="#{veiculoBean.marca}">
                    <f:selectItems value="#{veiculoBean.marcaList}" />
                </h:selectOneMenu>

                <h:commandButton value="Buscar" action="#{veiculoBean.buscar}" />
            </pre>
            </h:form>
            <table jsfc="h:dataTable" border="1">
        <tr>
          <td width="10%" align="center">Modelo</td>
          <td width="10%" align="center">Placa</td>
          <td width="10%" align="center">Ano Fabricação</td>
          <td width="10%" align="center">Ano Modelo</td>
          <td width="10%" align="center">Cor</td>
          <td width="10%" align="center">Combustível</td>
          <td width="10%" align="center">Portas</td>
          <td width="10%" align="center">Valor</td>
          <td width="10%" align="center">Características</td>
        </tr>
            </table>
            <c:forEach var="g" items="${veiculoBean.veiculos}">
        <table jsfc="h:dataTable" border="1">
        <tr>
          <td width="10%" align="center"><c:out value="${g.modelo}"/></td>
          <td width="10%" align="center"><c:out value="${g.placa}"/></td>
          <td width="10%" align="center"><c:out value="${g.anoFabricacao}"/></td>
          <td width="10%" align="center"><c:out value="${g.anoModelo}"/></td>
          <td width="10%" align="center"><c:out value="${g.cor}"/></td>
          <td width="10%" align="center"><c:out value="${g.combustivel}"/></td>
          <td width="10%" align="center"><c:out value="${g.portas}"/></td>
          <td width="10%" align="center"><c:out value="${g.valorVista}"/></td>
          <td width="10%" align="center"><c:out value="${g.caracteristicas}"/></td>
        </tr>
      </table>
            </c:forEach>
        </f:view>
    </body>
</html>
